package io.lvdaxian.handwriting.lambda;

import org.junit.Test;

import java.util.stream.Stream;

/**
 * 满足 任意元素存在即可
 * <p>
 * allMatch 全部条件匹配
 * noneMatch 没有任意元素匹配
 *
 * @author lihh
 */
public class AnyMatchTest {
  
  @Test
  public void test001() {
    boolean flag = Stream.of(1, 2, 3).anyMatch(l -> l >= 3);
    System.out.println(flag);
    
    boolean flag1 = Stream.of(1, 2, 3).anyMatch(l -> l > 3);
    System.out.println(flag1);
  }
}
